<!-- 操作手势组件 -->
<template>
  <div class="content">
    <van-empty description="没有数据..." v-if="dataLength === 0" />
    <slot :done="done" :dataLength="dataLength" v-else></slot>
    <!-- <RollEnd ref="RollEnd"></RollEnd> -->
  </div>
</template>

<script>
// import RollEnd from './RollEnd.vue'
import { Empty } from 'vant'
export default {
  name: 'MotionGroup',
  data () {
    return {
      dataLength: null
    }
  },

  components: {
    [Empty.name]: Empty
    // RollEnd
  },

  computed: {},
  mounted () {
    window.addEventListener('scroll', this.throttleScroll, true)
  },
  beforeDestroy () {
    window.removeEventListener('scroll', this.throttleScroll)
  },
  methods: {
    done () {
      this.$emit('getData')
    },
    throttleScroll () {

    }
  }
}

</script>
<style lang='less' scoped>
  .content {

  }
</style>
